﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using System.Reflection;

namespace Campeonato
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            AssemblyName assemblyName = Assembly.GetExecutingAssembly().GetName();

            string strPath = Path.GetDirectoryName(assemblyName.CodeBase);

            if (strPath.StartsWith("file:\\"))
                strPath = strPath.Remove(0, 6);

            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.Combine(strPath, "config\\log.config")));
            
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormMain());
        }
    }
}
